package com.gopay.common.domain.cbrmb;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.common.domain.BaseEntity;

/**
 * 
 * @ClassName: CbRmbBlacklist
 * @Description: 跨境人民币黑名单Entity
 * @author zoubin QQ:208697475
 * @date 2016年7月1日 下午1:08:55
 * @Copyright ©www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "CB_RMB_BLACKLIST")
public class CbRmbBlacklist extends BaseEntity implements Serializable {

    /**
     * @Fields serialVersionUID : default serialversionuid
     */
    private static final long serialVersionUID = -6191118358974581222L;

    /**
     * 编号
     */
    private int listId;
    /**
     * 录入时间
     */
    private Date addTime;
    /**
     * 个人姓名
     */
    private String personalName;
    /**
     * 个人身份证号
     */
    private String idCardNo;
    /**
     * 企业名称
     */
    private String corporationName;
    /**
     * 国付宝订单号
     */
    private String gopayOrderId;
    /**
     * 银行卡号
     */
    private String bankCardNo;
    /**
     * 原因
     */
    private String reason;
    /**
     * 删除状态，，0正常,1删除
     */
    private String deleteStatus;
    /**
     * 删除时间
     */
    private Date deleteTime;
    /**
     * 增加时操作员账号
     */
    private String operator_add_id;
    /**
     * 删除时操作员账号
     */
    private String operator_del_id;

    /**
     * 无参构造函数
     */
    public CbRmbBlacklist() {
        super();
    }

    public CbRmbBlacklist(int listId) {
        super();
        this.listId = listId;
    }

    /**
     * 全参构造函数
     * 
     * 
     * @param listId
     * @param addTime
     * @param personalName
     * @param idCardNo
     * @param corporationName
     * @param gopayOrderId
     * @param bankCardNo
     * @param reason
     * @param deleteStatus
     * @param deleteTime
     * @param operator_add_id
     * @param operator_del_id
     */
    public CbRmbBlacklist(int listId, Date addTime, String personalName, String idCardNo, String corporationName,
            String gopayOrderId, String bankCardNo, String reason, String deleteStatus, Date deleteTime,
            String operator_add_id, String operator_del_id) {
        super();
        this.listId = listId;
        this.addTime = addTime;
        this.personalName = personalName;
        this.idCardNo = idCardNo;
        this.corporationName = corporationName;
        this.gopayOrderId = gopayOrderId;
        this.bankCardNo = bankCardNo;
        this.reason = reason;
        this.deleteStatus = deleteStatus;
        this.deleteTime = deleteTime;
        this.operator_add_id = operator_add_id;
        this.operator_del_id = operator_del_id;
    }

    @Id
    @SequenceGenerator(name = "cbrmbBlacklistSeq", sequenceName = "CB_RMB_BLACKLIST_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "cbrmbBlacklistSeq")
    @Column(name = "LIST_ID", unique = true, nullable = false)
    public int getListId() {
        return listId;
    }

    public void setListId(int listId) {
        this.listId = listId;
    }

    @Column(name = "ADD_TIME")
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    @Column(name = "PERSONAL_NAME")
    public String getPersonalName() {
        this.personalName = SensitiveInfoUtils.autoReencrypt(this.personalName);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.personalName);
    }

    public void setPersonalName(String personalName) {
     // edit by huangcheng 2016年11月17日15:50:54 PCI认证修改
        this.personalName = SensitiveInfoUtils.smartEncryptWithCheck(personalName);
    }

    @Column(name = "IDCARD_NO")
    public String getIdCardNo() {
        this.idCardNo = SensitiveInfoUtils.autoReencrypt(this.idCardNo);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.idCardNo);
    }

    public void setIdCardNo(String idCardNo) {
        this.idCardNo = SensitiveInfoUtils.smartEncryptWithCheck(idCardNo);
    }

    @Column(name = "CORPORATION_NAME")
    public String getCorporationName() {
        return corporationName;
    }

    public void setCorporationName(String corporationName) {
        this.corporationName = corporationName;
    }

    @Column(name = "GOPAY_ORDER_ID")
    public String getGopayOrderId() {
        return gopayOrderId;
    }

    public void setGopayOrderId(String gopayOrderId) {
        this.gopayOrderId = gopayOrderId;
    }

    @Column(name = "BANKCARD_NO")
    public String getBankCardNo() {
        this.bankCardNo = SensitiveInfoUtils.autoReencrypt(this.bankCardNo);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.bankCardNo);
    }

    public void setBankCardNo(String bankCardNo) {
        this.bankCardNo = SensitiveInfoUtils.smartEncryptWithCheck(bankCardNo);
    }

    @Column(name = "REASON")
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Column(name = "DELETE_STATUS")
    public String getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(String deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    @Column(name = "DELETE_TIME")
    public Date getDeleteTime() {
        return deleteTime;
    }

    public void setDeleteTime(Date deleteTime) {
        this.deleteTime = deleteTime;
    }

    @Column(name = "OPERATOR_ADD_ID")
    public String getOperator_add_id() {
        return operator_add_id;
    }

    public void setOperator_add_id(String operator_add_id) {
        this.operator_add_id = operator_add_id;
    }

    @Column(name = "OPERATOR_DEL_ID")
    public String getOperator_del_id() {
        return operator_del_id;
    }

    public void setOperator_del_id(String operator_del_id) {
        this.operator_del_id = operator_del_id;
    }

}
